<template>
  <div class="form-designer-label-container-warp">
    <div class="label" :style="{width:labelWidth}">{{ label }}</div>
    <div class="container">
      <slot name="default"></slot>
    </div>
  </div>
</template>

<script>
export default {
  name: 'LabelContainer',
  props: {
    label: String,
    labelWidth: {
      type: [Number, String],
      default: 'auto'
    }
  },
  data() {
    return {}
  }
}
</script>

<style scoped lang="scss">
.form-designer-label-container-warp {
  display: flex;
  align-items: center;
  padding-left: 8px;
  box-sizing: border-box;

  .label {
    margin-right: 8px;
    font-size: 14px;
    flex: 0 1 auto;
    min-width: 56px;
  }

  .container {
    flex: 1;
  }

}
</style>
